/*
 * File   : includes/history.h
 * Author : Nandakiran Kirubanandan
 *
 * This file contains the function declarations for maintaining a history
 * of strings. (back/forward)
 *
 */

#ifndef __history_h
#define __history_h
#include "linkedlist.h"
class docHistory {
	struct list *current;
	public:
	linkedlist *list;
		/*
		 * Function Name : Constructor 
		 *      Creates a fresh history list.
		 * Parameters    : none
		 * Return Type   : none
		 *
		 */
		docHistory();
		~docHistory();
		/*
		 * Function Name : add 
		 *      Adds an URL to the history.
		 * Parameters    : none
		 * Return Type   : bool
		 *
		 */
		void add(char *url);

		/*
		 * Function Name : isBack
		 *      Returns whether u can go back in history.
		 * Parameters    : none
		 * Return Type   : void
		 *
		 */
		bool isBack();

		/*
		 * Function Name : isForward
		 *      Returns whether u can go forward in history.
		 * Parameters    : none
		 * Return Type   : void
		 *
		 */
		bool isForward();

		/*
		 * Function Name : getForward
		 *      Returns a url from history one step forward.
		 * Parameters    : none
		 * Return Type   : string
		 *
		 */
		char* getForward();

		/*
		 * Function Name : getBack
		 *      Returns a url from history one step back.
		 * Parameters    : none
		 * Return Type   : string
		 *
		 */
		char* getBack();
		
		/*
		 * Function Name : getCurrent
		 *      Returns a url from history in the current position.
		 * Parameters    : none
		 * Return Type   : string
		 *
		 */
		char* getCurrent();
};
#endif

